﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace BookOnline.Data
{
    public class Advertise
    {
        private string _AdvID;
        private string _AdvTitle;
        private string _AdvUrl;
        private string _AdvImages;
        private string _AdvSDate;
        private string _AdvEDate;

        public string AdvID { get { return _AdvID; } set { _AdvID = value; } }
        public string AdvTitle { get { return _AdvTitle; } set { _AdvTitle = value; } }
        public string AdvUrl { get { return _AdvUrl; } set { _AdvUrl = value; } }
        public string AdvImages { get { return _AdvImages; } set { _AdvImages = value; } }
        public string AdvSDate { get { return _AdvSDate; } set { _AdvSDate = value; } }
        public string AdvEDate { get { return _AdvEDate; } set { _AdvEDate = value; } }

        public Advertise AdvertiseIDataReader(IDataReader dr)
        {
            Advertise obj = new Advertise();
            obj.AdvID = (dr["AdvID"] is DBNull) ? string.Empty : dr["AdvID"].ToString();
            obj.AdvTitle = (dr["AdvTitle"] is DBNull) ? string.Empty : dr["AdvTitle"].ToString();
            obj.AdvUrl = (dr["AdvUrl"] is DBNull) ? string.Empty : dr["AdvUrl"].ToString();
            obj.AdvImages = (dr["AdvImages"] is DBNull) ? string.Empty : dr["AdvImages"].ToString();
            obj.AdvSDate = (dr["AdvSDate"] is DBNull) ? string.Empty : dr["AdvSDate"].ToString();
            obj.AdvEDate = (dr["AdvEDate"] is DBNull) ? string.Empty : dr["AdvEDate"].ToString();
            return obj;
        }
    }
}
